fix(ui): handle undefined field admin components#17370
Merged
jacobsfletch merged 4 commits intoJul 17, 2026
Merged
Conversation
rasitakyol
marked this pull request as ready for review
July 16, 2026 21:01
rasitakyol
requested review from
AlessioGr,
JarrodMFlesch and
jacobsfletch
as code owners
July 16, 2026 21:01
JarrodMFlesch
enabled auto-merge (squash)
July 17, 2026 13:23
JarrodMFlesch
disabled auto-merge
July 17, 2026 14:43
| SortColumn: () => null, | ||
| })) | ||
|
|
||
| describe('buildColumnState', () => { |
Member
There was a problem hiding this comment.
This test would be better written as e2e, given it crashes admin
Member
There was a problem hiding this comment.
Ended up keeping this unit test, and using an additional e2e as smoke test
…mponents' into codex/fix-undefined-admin-components
jacobsfletch
approved these changes
Jul 17, 2026
jacobsfletch
left a comment
Member
There was a problem hiding this comment.
Thank you @rasitakyol! Would you be willing to back-port this against the 3.x branch?
jacobsfletch
added a commit
that referenced
this pull request
Jul 17, 2026
Backport #17370 to the `3.x` branch. --------- Co-authored-by: Jake Fletcher <jacobsfletch@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
admin.componentsvalue is explicitlyundefined.Why?
Config transformers can preserve
adminwhile clearingcomponentswithcomponents: undefined. The property still passes theincheck, so the subsequent'Label' in serverField.admin.componentsoperation throws and crashes the collection list.How?
The custom label path now checks the
componentsvalue before readingLabel, matching the existing custom cell guard in the same function. The admin test collection reproduces the configuration, and the list-view E2E test verifies that the collection renders without a browser console error.Fixes #17369
Testing
pnpm test:e2e admin__e2e__list-view --grep='should render a list view when field admin components are undefined' --workers=1pnpm prettier --write packages/ui/src/providers/TableColumns/buildColumnState/index.tsx test/admin/collections/NoTimestamps.ts test/admin/e2e/list-view/e2e.spec.tspnpm eslint --flag v10_config_lookup_from_file --quiet packages/ui/src/providers/TableColumns/buildColumnState/index.tsx test/admin/collections/NoTimestamps.ts test/admin/e2e/list-view/e2e.spec.tspnpm build:ui